home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_clput.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
822b
|
39 lines
#include <stdio.h>
#include <dos.h>
struct BITRECT {
unsigned char far *buff;
unsigned char pagenumber,reserve;
int x1,y1,x2,y2;
unsigned colorid;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_colorput(unsigned char far *writebuff,unsigned char writepage,
int startx,int starty,int endx,int endy,unsigned color,unsigned char mode)
{
union REGS reg;
struct SREGS seg;
struct BITRECT rimg;
segread(&seg);
reg.h.ah=gds_fshift+0x0e;
reg.h.al=mode;
reg.x.di=(unsigned)&rimg;
seg.ds=seg.ss;
rimg.buff=writebuff;
rimg.pagenumber=writepage;
rimg.reserve=0;
rimg.x1=startx;
rimg.y1=starty;
rimg.x2=endx;
rimg.y2=endy;
rimg.colorid=color;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
}